function fileType(obj) {
	var fileType = obj.value.substr(obj.value.lastIndexOf(".")).toLowerCase();//获得文件后缀名
	if (fileType != '.xls') {
		$("#excel").tips({
			side : 3,
			msg : '请上传xls格式的文件',
			bg : '#AE81FF',
			time : 3
		});
		$("#excel").val('');
		document.getElementById("excel").files[0] = '请选择xls格式的文件';
	}
};

function batchAdd() {
	layer.open({
         type: 2,
         title: '批量新增',
         maxmin: true,
         shadeClose: false, 
         area : ['360px' , '300px'],
         content: "batchRenewal/Batch.do"
     });
};

function downTemplateFile() {
	window.location.href='batchRenewal/downExcel.do?templateName=batchRenewal.xls';
};


function previewImg(imgPath) {
	layer.photos({
        html: '',
        json: { 
            "status": 1,    
            "msg": "",  
            "title": "",   
            "id": 11,    
            "start": 0, 
            "data": [  
                {
                    "name": "", 
                    "pid": 1, 
                    "src": "images/blacklist/xspic.jpg", 
                    "thumb": "",
                    "area": [638, 851]
                }
            ]
        }
    });
}

